const { ccclass, property } = cc._decorator;

@ccclass
export default class WithDrawRecordItemCtrl extends cc.Component {
    @property(cc.Node)
    ui = null;
    record = null;

    onLoad() {
        this.onUILoad();
        this.addButtonListen();
    }

    start() { }

    setData(data) {
        this.initData(data);
    }

    onUILoad() {
        this.ui = this.node.addComponent(s);
    }

    addButtonListen() { }

    initData(data) {
        if (data) {
            this.record = data;
            this.initUI();
        }
    }

    initUI() {
        this.ui.title.getComponent(cc.Label).string = this.record.title;
        this.ui.withdraw_time.getComponent(cc.Label).string = this.record.withdraw_time;
        this.ui.withdraw_num.getComponent(cc.Label).string = l.getCashBalance(this.record.withdraw_num) + "元";
        this.ui.desc.getComponent(cc.Label).string = this.record.desc;
    }
}
